/* --- Finder App Styles --- */
.finder-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.finder-sidebar {
    width: 200px;
    background-color: rgba(0,0,0,0.05);
    padding: 20px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.finder-sidebar h3 {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin: 0 0 10px 0;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-item.active, .sidebar-item:hover {
    background-color: rgba(0,0,0,0.1);
}

.finder-main {
    flex-grow: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 20px;
    align-content: flex-start;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
}

.file-item img {
    width: 60px;
    height: 60px;
}

.file-icon-pdf {
    width: 60px;
    height: 60px;
    background-color: #e81123;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.file-icon-pdf::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-top: 18px solid rgba(0,0,0,0.2);
}


/* --- Settings App Styles --- */
.settings-container {
    display: flex;
    width: 100%;
    height: 100%;
}
.settings-sidebar {
    width: 200px;
    background-color: rgba(0,0,0,0.05);
    padding: 10px;
    flex-shrink: 0;
    box-sizing: border-box;
    border-right: 1px solid rgba(0,0,0,0.08);
}
.settings-main {
    flex-grow: 1;
    padding: 20px;
}

.settings-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.settings-item {
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 5px;
}
.settings-item.active, .settings-item:hover {
    background-color: rgba(0,0,0,0.1);
}

/* Sound Settings */
.sound-option {
    margin-top: 20px;
}
.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}
#volume-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.1);
    border-radius: 4px;
    outline: none;
    transition: opacity .2s;
}
#volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
#volume-value {
    font-variant-numeric: tabular-nums;
}
/* Display Settings */
.wallpaper-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 20px;
}
.wallpaper-option {
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
    text-align: center;
}
.wallpaper-option:hover {
    border-color: #007aff;
}
.wallpaper-option img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}
.wallpaper-option span {
    display: block;
    padding: 8px;
    font-size: 12px;
    background-color: rgba(0,0,0,0.02);
}

/* --- Browser App Styles --- */
.browser-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- App Store Styles --- */
.app-store-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.app-store-container h2 {
    margin-top: 0;
    padding: 20px 20px 0 20px;
}

#app-store-listings {
    overflow-y: auto;
    flex-grow: 1;
    padding: 0 20px;
}

.app-listing {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 5px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.app-listing:last-child {
    border-bottom: none;
}

.app-listing img {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: contain; /* Prevent stretching */
}

.app-info {
    flex-grow: 1;
}

.app-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.app-info p {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.install-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #007aff;
    background-color: rgba(0, 122, 255, 0.1);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.install-btn:hover {
    background-color: rgba(0, 122, 255, 0.2);
}

.install-btn:disabled {
    color: #8e8e93;
    background-color: rgba(142, 142, 147, 0.12);
    cursor: not-allowed;
}

/* --- Feedback App --- */
.feedback-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    background-color: #f5f5f7;
}

.feedback-container h2 {
    margin: 0;
    padding: 20px;
    font-size: 20px;
    border-bottom: 1px solid #ddd;
    background-color: #fff;
}

#comments-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: #666;
}

.comment-content {
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}
.comment-content p {
    margin: 0 0 10px 0;
}
.comment-content p:last-child {
    margin-bottom: 0;
}
.comment-content img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    margin-top: 10px;
}

.feedback-form-container {
    padding: 15px;
    border-top: 1px solid #ddd;
    background-color: #fff;
}

#feedback-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#feedback-input {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    resize: vertical;
}

#submit-feedback {
    align-self: flex-end;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background-color: #007aff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#submit-feedback:disabled {
    background-color: #a0c9ff;
    cursor: not-allowed;
}

#feedback-status {
    padding: 0 10px 10px 10px;
    font-size: 13px;
    color: #666;
    text-align: center;
}


/* --- AI Assistant App Styles --- */
.ai-assistant-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
}

.ai-assistant-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.ai-header-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.ai-assistant-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.ai-assistant-header p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #666;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 75%;
    line-height: 1.4;
    font-size: 14px;
}

.user-message {
    background-color: #007aff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.assistant-message {
    background-color: #e5e5ea;
    color: #222;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(0,0,0,0.08);
    background-color: #f9f9f9;
}

.chat-input-form {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 5px;
}

.chat-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 8px 15px;
    font-size: 14px;
    outline: none;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border: none;
    background-color: #007aff;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s;
}

.chat-send-btn:hover {
    background-color: #0056b3;
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
}

.chat-send-btn:disabled {
    background-color: #a0c9ff;
    cursor: not-allowed;
}

/* --- Calculator App Styles --- */
.calculator-container {
    width: 100%;
    height: 100%;
    background-color: #1c1c1c;
    display: flex;
    flex-direction: column;
    padding: 20px 20px 10px 20px;
    box-sizing: border-box;
    gap: 20px;
}
.calculator-display {
    flex-grow: 1;
    color: white;
    font-size: 72px;
    font-weight: 200;
    text-align: right;
    padding: 0 10px 10px 10px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}
.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 15px;
    background-color: transparent;
}
.calc-btn {
    background-color: #505050;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    font-weight: 500;
}
.calc-btn:hover {
    background-color: #737373;
}
.calc-btn:active {
    background-color: #888;
}
.calc-btn.function {
    background-color: #d4d4d2;
    color: #1c1c1c;
}
.calc-btn.function:hover {
    background-color: #f0f0f0;
}
.calc-btn.operator {
    background-color: #ff9500;
}
.calc-btn.operator:hover {
    background-color: #ffb143;
}
.calc-btn.zero {
    grid-column: 1 / 3;
    border-radius: 40px;
    justify-content: flex-start;
    padding-left: 30px;
    aspect-ratio: auto;
}

/* --- Terminal App Styles --- */
.terminal-container {
    width: 100%;
    height: 100%;
    background-color: #1e1e1e;
    color: #0f0;
    font-family: 'Menlo', 'Courier New', monospace;
    font-size: 14px;
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    line-height: 1.4;
    cursor: text;
}
.terminal-output {
    word-break: break-all;
}
.terminal-output .prompt {
    color: #0f0;
}
.terminal-output .command {
    color: #fff;
}
.terminal-input-line {
    display: flex;
}
.terminal-prompt {
    white-space: pre;
}
.terminal-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #0f0;
    font-family: inherit;
    font-size: inherit;
    outline: none;
    padding: 0;
}

/* --- Notepad App Styles --- */
.notepad-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.notepad-textarea {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    border: none;
    padding: 20px;
    font-family: 'Menlo', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    box-sizing: border-box;
    resize: none;
    background-color: transparent;
    color: #222;
}
.notepad-textarea:focus {
    outline: none;
}

.save-notepad-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background-color: #007aff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 10;
}

.save-notepad-btn:hover {
    background-color: #0056b3;
}

/* --- SleekAV App Styles --- */
.sleekav-container {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1f2a37, #111827);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 30px;
    box-sizing: border-box;
    text-align: center;
}

.sleekav-header {
    width: 100%;
}

.sleekav-header img {
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
    object-fit: contain; /* Changed from cover */
}
.sleekav-header h2 {
    margin-top: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}
.sleekav-header p {
    color: #9ca3af;
    font-size: 14px;
    margin-top: 5px;
}
.sleekav-status {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.status-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    color: white;
    margin-bottom: 15px;
    border: 4px solid;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
.status-icon.safe { background-color: #10b981; border-color: #059669; }
.status-icon.scanning { background-color: #3b82f6; border-color: #2563eb; animation: pulse 1.5s infinite; }
.status-icon.unsafe { background-color: #ef4444; border-color: #dc2626; }

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
    50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); }
    100% { transform: scale(1); box-shadow: 0 0 20px rgba(59, 130, 246, 0.3); }
}

.sleekav-status .status-text {
    font-size: 20px;
    color: #d1d5db;
    font-weight: 500;
    margin: 0;
}

.sleekav-scan {
    width: 100%;
}

.scan-button {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}
.scan-button:hover { background-color: #2563eb; transform: translateY(-2px); }
.scan-button:disabled { background-color: #60a5fa; cursor: not-allowed; box-shadow: none; transform: none; }

.scan-progress-container {
    width: 100%;
    max-width: 350px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 10px auto;
    overflow: hidden;
}
.scan-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #3b82f6;
    transition: width 0.1s linear;
}
.scan-details {
    font-size: 13px;
    color: #9ca3af;
    height: 18px;
    margin-top: 10px;
}
.sleekav-footer {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 12px;
    color: #6b7280;
}

/* --- Infinite Hallway App Styles --- */
.infinite-hallway-container {
    width: 100%;
    height: 100%;
    background-color: #000;
    position: relative;
    overflow: hidden;
}

.infinite-hallway-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    z-index: 10;
    background-color: #000;
}


/* --- Tic-Tac-Toe Game Styles --- */
.tictactoe-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background-color: #f0f0f0;
}
.tictactoe-status {
    font-size: 20px;
    font-weight: 500;
}
.tictactoe-board {
    display: grid;
    grid-template-columns: repeat(3, 100px);
    grid-template-rows: repeat(3, 100px);
    gap: 5px;
    background-color: #333;
    border: 5px solid #333;
    border-radius: 8px;
}
.cell {
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 60px;
    font-weight: bold;
    cursor: pointer;
}
.cell.x { color: #28a745; }
.cell.o { color: #007bff; }
.tictactoe-restart {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background-color: #6c757d;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.tictactoe-restart:hover {
    background-color: #5a6268;
}

/* --- Cookie Baker Game Styles --- */
.cookie-baker-container {
    width: 100%;
    height: 100%;
    display: flex;
    background: url('cookie_baker_background.png') no-repeat center center;
    background-size: cover;
    color: white;
    font-family: 'Inter', sans-serif;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.cookie-baker-main {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

#cookie-display {
    font-size: 32px;
    font-weight: 700;
}
#cps-display {
    font-size: 16px;
    opacity: 0.8;
}

#big-cookie {
    width: 200px;
    height: 200px;
    cursor: pointer;
    transition: transform 0.1s ease;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
    animation: spin 30s linear infinite;
}
#big-cookie:active {
    transform: scale(0.95);
}
.floating-text {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    color: white;
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
}
@keyframes float-up {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-50px); }
}

.cookie-baker-upgrades {
    flex: 1;
    background-color: rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

.cookie-baker-upgrades h3 {
    margin-top: 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

.upgrade-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.upgrade-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.upgrade-item:not(.disabled):hover {
    background-color: rgba(255,255,255,0.2);
}
.upgrade-item img {
    width: 50px;
    height: 50px;
}
.upgrade-info {
    flex-grow: 1;
}
.upgrade-info h4 {
    margin: 0;
}
.upgrade-info p {
    margin: 4px 0 0 0;
    font-size: 13px;
    opacity: 0.8;
}
.upgrade-cost {
    font-size: 16px;
    font-weight: 600;
}